// pages/applicationInfo/applicationInfo.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    storeInfo:{},
    showStoreInfo:false
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    let phoneNumber = wx.getStorageSync('userInfo').account
    this.setData({
      phoneNumber:phoneNumber
    })

    wx.cloud.callFunction({
      name:"getStoreInfo",
      data:{
        phoneNumber:phoneNumber
      }
    }).then(res=>{
      this.setData({
        storeInfo:res.result.data[0]
      })
      // wx.setStorageSync('storeInfo', res.result.data[0])
    })
  },

  showStoreInfo(){
    this.setData({
      showStoreInfo:true
    })
  },

  hideStoreInfo(){
    this.setData({
      showStoreInfo:false
    })
  },

  apply(){
    wx.navigateTo({
      url: '/pages/application/application',
    })
  }
})